import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpSessionEvent;
//import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionListener;

public class SessionListener extends HttpServlet implements HttpSessionListener {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * 
	 */
	public void sessionCreated(HttpSessionEvent se) {
	}
	
	/**
	 * 
	 */
	public void sessionDestroyed(HttpSessionEvent se) {
		/*try{
			HttpSession session = se.getSession();
			String MM_aranciaDB0_DRIVER = "com.inet.tds.TdsDriver";
			String MM_aranciaDB0_USERNAME = "b2b";
			String MM_aranciaDB0_PASSWORD = "b2b";
			//String MM_aranciaDB0_STRING = "jdbc:inetdae7:sdolc01:1433?database=bank2baan2";
			String MM_aranciaDB0_STRING = "jdbc:inetdae7:sql-server-2008?database=b2b";
			//java.sql.Driver dv_guardar_session = (java.sql.Driver)
			Class.forName(MM_aranciaDB0_DRIVER).newInstance();
			java.sql.Connection con_guardar_session =  java.sql.DriverManager.getConnection(MM_aranciaDB0_STRING,MM_aranciaDB0_USERNAME,MM_aranciaDB0_PASSWORD);
			java.sql.Statement stmt_guardar_session = con_guardar_session.createStatement();
			stmt_guardar_session.execute("update arb2_cuentas set sessionblock = null where sessionblock = '"+session.getId()+"'");
			stmt_guardar_session.close();
			con_guardar_session.close();
		}catch( Exception e ){
			e.printStackTrace(System.out);
		}*/
	}
}
